﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MethodWorx.CMS.UI.Controllers;
using Moq;
using MethodWorx.CMS.Administration;
using MethodWorx.Core.DomainModel;
using MethodWorx.CMS.Plugins;
using MethodWorx.CMS.UI.Tests.Stubs;
using MethodWorx.CMS.UI.Models;

namespace MethodWorx.CMS.UI.Tests.Administration
{
    [TestClass]
    public class PluginTests
    {
        private AdministrationController CreateSystemUnderTest(IPluginRepository plugins)
        {
            return new AdministrationController(new StubUnitOfWorkFactory(), new Mock<IApplicationSettingsRepository>().Object, plugins);
        }

        [TestMethod]
        public void Ensure_Plugin_Action_Displays_Plugin_View()
        {
           /* var sut = this.CreateSystemUnderTest(new Mock<IPluginRepository>().Object);
            var result = sut.Plugins();

            TestHelper.AssertIsViewResult(result, "Plugins");*/
        }

        [TestMethod]
        public void Ensure_Plugins_Model_Contains_All_Plugins()
        {
           /* var plugins = new Mock<IPluginRepository>();
            plugins.Setup(m => m.All())
                .Returns(
                    new IPlugin [] { new StubPlugin(), new StubPlugin() })
                .Verifiable();

            var sut = this.CreateSystemUnderTest(plugins.Object);
            var result = sut.Plugins();

            TestHelper.AssertIsViewResult(result, "Plugins");
            var model = TestHelper.AssertResultContainsModel<PluginsModel>(result);

            plugins.Verify();
            Assert.IsTrue(model.Plugins == plugins.Object.All());*/
        }
    }
}
